home *** CD-ROM | disk | FTP | other *** search
/ Aminet 30 / Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso / Aminet / dev / lang / SmallEiffel.lha / SmallEiffel / lib_rand / demo2.e < prev    next >
Text File  |  1998-12-22  |  1KB  |  40 lines

  1. -- This file is  free  software, which  comes  along  with  SmallEiffel. This
  2. -- software  is  distributed  in the hope that it will be useful, but WITHOUT 
  3. -- ANY  WARRANTY;  without  even  the  implied warranty of MERCHANTABILITY or
  4. -- FITNESS  FOR A PARTICULAR PURPOSE. You can modify it as you want, provided
  5. -- this header is kept unaltered, and a notification of the changes is added.
  6. -- You  are  allowed  to  redistribute  it and sell it, alone or as a part of 
  7. -- another product.
  8. --          Copyright (C) 1994-98 LORIA - UHP - CRIN - INRIA - FRANCE
  9. --            Dominique COLNET and Suzanne COLLIN - colnet@loria.fr 
  10. --                       http://www.loria.fr/SmallEiffel
  11. --
  12. class DEMO2
  13.  
  14. creation make 
  15.  
  16. feature
  17.  
  18.    make is
  19.       local
  20.      std_rand: MIN_STAND;
  21.      count: INTEGER;
  22.       do
  23.      io.put_string("Using the MIN_STAND random number generator.%N%
  24.                %How many numbers ? ");
  25.      io.read_integer;
  26.      count := io.last_integer;
  27.      from
  28.         !!std_rand.make;
  29.      until
  30.         count = 0
  31.      loop
  32.         std_rand.next;
  33.         io.put_real(std_rand.last_real);
  34.         count := count - 1;
  35.         io.put_string("%N");
  36.      end;
  37.       end;
  38.  
  39. end -- DEMO2
  40.